package com.iakuil.app.common.core.constant;

/**
 * 系统全局常量
 *
 * @author Kai
 */
public class SysConstant {
    /**
     * 公司域名（倒写）
     */
    public static final String CORP_DOMAIN_NAME = "com.iakuil";

    /**
     * 项目代号，比如mvp、xxx-portal
     */
    public static final String APP_SYMBOL = "app";

    /**
     * 基础包名
     */
    public static final String BASE_APP_PACKAGE = CORP_DOMAIN_NAME + "." + APP_SYMBOL;

    /**
     * Mapper包路径
     */
    public static final String BASE_MAPPER_PACKAGES = BASE_APP_PACKAGE + ".repository.dao";

    /**
     * 排序字段
     */
    public static final String DEFAULT_SORT_PARAM = "sort";

    /**
     * 页数字段
     */
    public static final String DEFAULT_PAGE_NUM_PARAM = "pageNum";

    /**
     * 每页数量字段
     */
    public static final String DEFAULT_PAGE_SIZE_PARAM = "pageSize";

    /**
     * 默认分页大小
     */
    public static final Integer DEFAULT_PAGE_SIZE = 10;

    /**
     * 最大每页数量
     */
    public static final Integer MAX_PAGE_SIZE = 500;

    /**
     * 默认页码
     */
    public static final Integer DEFAULT_PAGE_NUM = 1;

    /**
     * 最大页码（防止深分页）
     */
    public static final Integer MAX_PAGE_NUM = 100;

    /**
     * 字段过滤参数名
     */
    public static final String PROP_FILTER = "fields";

    /**
     * 创建时间字段
     */
    public static final String DEFAULT_CREATE_TIME_FIELD = "createTime";

    /**
     * 创建人字段
     */
    public static final String DEFAULT_CREATE_USER_FIELD = "createBy";

    /**
     * 修改时间字段
     */
    public static final String DEFAULT_UPDATE_TIME_FIELD = "updateTime";

    /**
     * 修改人字段
     */
    public static final String DEFAULT_UPDATE_USER_FIELD = "updateBy";

    /**
     * 默认批量插入分片
     */
    public static final Integer DEFAULT_BATCH_CHUNK_SIZE = 1000;

    /**
     * 默认系统用户ID
     */
    public static final Long SYS_USER_ID = -1L;

    /**
     * MDC RequestId key
     */
    public static final String MDC_KEY_RID = "traceId";

    /**
     * MDC SpanId key
     */
    public static final String MDC_KEY_SID = "spanId";

    /**
     * MDC ParentSpanId key
     */
    public static final String MDC_KEY_PSID = "pSpanId";

    /**
     * The Key of RequestId in Http Header
     */
    public static final String HEADER_X_REQUEST_ID = "X-Request-Id";
}
